<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: EventTube</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: EventTube</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>EventTube<span class="signature">(address, cb, timeout)</span><span class="type-signature"></span></h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    
    <h4 class="name" id="EventTube"><span class="type-signature"></span>new EventTube<span class="signature">(address, cb, timeout)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    构建事件订阅对象实例
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>address</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">websocket服务地址</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cb</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#websocketCallback">websocketCallback</a></span>


            
            </td>

            

            

            <td class="description last">处理返回信息的回调函数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>timeout</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">重连的时间间隔</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="events.js.html">events.js</a>, <a href="events.js.html#line16">line 16</a>
    </li></ul></dd>
    

    

    

    
</dl>


















    
    </div>

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="close"><span class="type-signature"></span>close<span class="signature">(reason)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    主动关闭websocket连接
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>reason</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">解释主动关闭连接的原因，不超过123字节</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="events.js.html">events.js</a>, <a href="events.js.html#line66">line 66</a>
    </li></ul></dd>
    

    

    

    
</dl>


















        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EventTube.html">EventTube</a></li><li><a href="RestAPI.html">RestAPI</a></li><li><a href="Transaction.html">Transaction</a></li></ul><h3>Global</h3><ul><li><a href="global.html#CalculateAddr">CalculateAddr</a></li><li><a href="global.html#CreateCertificate">CreateCertificate</a></li><li><a href="global.html#CreateCSR">CreateCSR</a></li><li><a href="global.html#CreateKeypair">CreateKeypair</a></li><li><a href="global.html#CreateSelfSignedCertificate">CreateSelfSignedCertificate</a></li><li><a href="global.html#GetCSRInfoFromPEM">GetCSRInfoFromPEM</a></li><li><a href="global.html#GetHashVal">GetHashVal</a></li><li><a href="global.html#GetKeyPEM">GetKeyPEM</a></li><li><a href="global.html#ImportCertificate">ImportCertificate</a></li><li><a href="global.html#ImportKey">ImportKey</a></li><li><a href="global.html#Sign">Sign</a></li><li><a href="global.html#VerifyCertificateSignature">VerifyCertificateSignature</a></li><li><a href="global.html#VerifySign">VerifySign</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Sep 27 2020 14:29:27 GMT+0800 (China Standard Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>